1 ================================================================================
2 WINDOWS FORMS APPLICATION : CSWinFormLocalization Project Overview
4 ===============================================================================
6 /////////////////////////////////////////////////////////////////////////////
9 The Windows Forms Localization sample demonstrates how to localize
10 Windows Forms application.
13 /////////////////////////////////////////////////////////////////////////////
16 1. Create a new Windows Application named "CSWinFormLocalization".
18 2. In the Properties window, set the form's Localizable property to true.
20 3. Drag two Button controls and one Label control from the Windows Forms tab
21 of the Toolbox to the form, and set their Text property as follows:
23 button1: "Hello World!",
24 button2: "I'm a button.",
25 label1 : "I'm a label".
27 4. Set the form's Language property to Chinese (Simplified Chinese).
29 5. Set the Text property for the three controls as follows:
35 6. Save and build the solution.
37 7. Click the Show All Files button in Solution Explorer.
39 The resource files appear underneath Form1.cs.
40 Form1.resx is the resource file for the default culture.
41 Form1.zh-CHS.resx is the resource file for Simplified Chinese as spoken in PRC.
43 8. Press Ctrl+F5 to run the application, the buttons and label will display in
44 English or Simplified Chinese depending on the UI language of your o
47 9. If you want the form always display in Simplified Chinese, you can set the
48 UI culture to Simplified Chinese before calling the InitializeComponent method.
52 // Sets the UI culture to Simplified Chinese.
53 Thread.CurrentThread.CurrentUICulture = new CultureInfo("zh-CHS");
55 InitializeComponent();
60 /////////////////////////////////////////////////////////////////////////////
63 1. Walkthrough: Localizing Windows Forms
64 http://msdn.microsoft.com/en-us/library/y99d1cd3.aspx
66 2. Windows Forms General FAQ.
67 http://social.msdn.microsoft.com/Forums/en-US/winforms/thread/77a66f05-804e-4d58-8214-0c32d8f43191
70 /////////////////////////////////////////////////////////////////////////////